package com.bootcamp.mall.model.vo.order;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: mall
 * @description:
 * @author: Keyu Li
 * @create: 2021-11-11 17:38
 **/

@Data
public class OrdersOfOrderByPageVO {
    Integer id;
    Integer userId;
    Integer goodsDetailId;
    String goods;
    String spec;
    Integer goodsNum;
    BigDecimal amount;
    Integer stateId;
    String state;
    Date updateTime;
    UserOfOrderOfPageVO user = new UserOfOrderOfPageVO();

    public void setStateId(Integer stateId){
        this.stateId = stateId;
        if (stateId==0){
            setState("未付款");
        }else if (stateId==1){
            setState("未发货");
        }else if (stateId==2){
            setState("已发货");
        }else if (stateId==3){
            setState("已到货");
        }
    }

    public void setNickname(String nickname){
        this.user.setNickname(nickname);
    }

    public void setName(String name){
        this.user.setName(name);
    }

    public void setAddress(String address){
        this.user.setAddress(address);
    }

    public void setPhone(String phone){
        this.user.setPhone(phone);
    }
}
